package inner_class;


public class Outter {
    private String msg = "Outter中的msg属性";
    private static int age = 0;
    public void fun(){
        System.out.println("Outter的fum方法");
//        Inner inner = new Inner();
//        System.out.println(inner.innerMsg);
//        inner.fun();
    }
    //-------------分割线---------------
    // 成员内部类
    // 私有内部类
     private class Inner{
        private  String nema = "112";
        private String innerMsg = "Inner中的msg属性";
        public void fun(){
            System.out.println(age);
            System.out.println("-------------分割线---------------");
            System.out.println("Inner的fun方法");
            Outter.this.fun();
//            System.out.println(innerMsg);
//            System.out.println(msg);
//            //这是 外部类对象
//            System.out.println(Outter.this);
//            //这是 内部类对象
//            System.out.println(this);

        }
    }
    //-------------分割线---------------
    public static void main(String[] args) {
//        Outter outter = new Outter();
//        outter.fun();
//        Outter.Inner inner = new Outter().new Inner();

//        Outter.Inner inner = new Outter().new Inner();
//        inner.fun();
    }
}
